#!/bin/sh
set +e

while true;
do
	read -p "Are you sure to delete/format your mtd2 JFFS2 partition? (yes/no) " answ
	case $answ in
		[Yy]* ) flash_erase -j /dev/mtd2 0 0; break;;
		[Nn]* ) exit;;
		* ) echo "Please answer yes or no.";;
	esac
done
